#!/usr/bin/env python

import wx

class SaveTo(wx.Button):
    
    def __init__(self, *args, **kwargs):
        wx.Button.__init__(self, *args, **kwargs)
        self.Bind(wx.EVT_BUTTON, self._onButton)
        
    def _onButton(self, event):
        dlg = wx.DirDialog(self, defaultPath=self.Label)
        if dlg.ShowModal() == wx.ID_OK:
            self.Label = dlg.Path
        event.Skip()
